package com.infore.dataReceiving.repository;
import java.sql.Timestamp;
import java.util.List;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import com.infore.dataReceiving.entity.EquipmentInfo;

public interface IEquipmentInfoRepository extends JpaRepository<EquipmentInfo, String>, JpaSpecificationExecutor<EquipmentInfo>  {
	
	Page<EquipmentInfo> findByDataTimeBetweenAndMnAndCodeInOrderByDataTimeDesc(Timestamp beginTime, Timestamp endTime, String mn, List<String> codes, Pageable pageable);
	
	List<EquipmentInfo> findByDataTimeBetweenAndMnAndCodeInOrderByDataTimeDesc
    (Timestamp beginTime, Timestamp endTime, String mn, List<String> codes);

	List<EquipmentInfo> findByDataTimeBetweenAndMnAndFactorCodeAndCodeInOrderByDataTimeAsc
	            (Timestamp beginTime, Timestamp endTime, String mn, String factorCode, List<String> codes);
}
